SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 44097: A note found in the PROC FORMAT PICTURE statement documentation is incorrect and might cause incorrect formatted values

DetailsAboutRate It
There is a note regarding how to add a leading zero before a single-digit number when using a directive in the Base SAS® 9.3 Procedures Guide under the PROC FORMAT PICTURE statement. The note incorrectly states the following:

Note: To add a leading zero before a single-digit number, insert a 0 before the directive (for example, 0%d).

The note should read as follows:

Note: To add a leading zero before a single-digit number, insert a 0 before the directive (for example, %0d).

The note appears under multiple directives. This documented but incorrect syntax can cause undesirable results in SAS output. For example, given a SAS date variable value of '01JAN2009'd, the following PICTURE statement produces the formatted value of 01-0JAN-020:

 
picture doc93_ (default=11) other='0%d-0%b-0%Y' (datatype=date);

The corrected PICTURE statement follows, producing the desired value of 01-JAN-2009:

   
picture doc92_ (default=11) other='%0d-%0b-%0Y' (datatype=date);

For more examples of using the PICTURE statement with date, time, and datetime formats, see SAS Note 8510: PROC FORMAT with PICTURE statement gives flexibility for DATE, TIME and DATETIME FORMATS.

Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemBase SASz/OS9.3 TS1M09.3 TS1M2
Z649.3 TS1M09.3 TS1M2
Microsoft® Windows® for x649.3 TS1M09.3 TS1M2
Microsoft Windows Server 2003 Datacenter Edition9.3 TS1M09.3 TS1M2
Microsoft Windows Server 2003 Enterprise Edition9.3 TS1M09.3 TS1M2
Microsoft Windows Server 2003 Standard Edition9.3 TS1M09.3 TS1M2
Microsoft Windows Server 2003 for x649.3 TS1M09.3 TS1M2
Microsoft Windows Server 20089.3 TS1M09.3 TS1M2
Microsoft Windows Server 2008 for x649.3 TS1M09.3 TS1M2
Microsoft Windows XP Professional9.3 TS1M09.3 TS1M2
Windows 7 Enterprise 32 bit9.3 TS1M09.3 TS1M2
Windows 7 Enterprise x649.3 TS1M09.3 TS1M2
Windows 7 Home Premium 32 bit9.3 TS1M09.3 TS1M2
Windows 7 Home Premium x649.3 TS1M09.3 TS1M2
Windows 7 Professional 32 bit9.3 TS1M09.3 TS1M2
Windows 7 Professional x649.3 TS1M09.3 TS1M2
Windows 7 Ultimate 32 bit9.3 TS1M09.3 TS1M2
Windows 7 Ultimate x649.3 TS1M09.3 TS1M2
Windows Vista9.3 TS1M09.3 TS1M2
Windows Vista for x649.3 TS1M09.3 TS1M2
64-bit Enabled AIX9.3 TS1M09.3 TS1M2
64-bit Enabled HP-UX9.3 TS1M09.3 TS1M2
64-bit Enabled Solaris9.3 TS1M09.3 TS1M2
HP-UX IPF9.3 TS1M09.3 TS1M2
Linux9.3 TS1M09.3 TS1M2
Linux for x649.3 TS1M09.3 TS1M2
Solaris for x649.3 TS1M09.3 TS1M2
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.